package cn.openea.perpartner.minrest.config;


import cn.openea.perpartner.minrest.filter.MinRestFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author xuxueli 2018-11-15
 */
@Configuration
public class MinRestConfig {

    @Bean
    public FilterRegistrationBean minRestFilterRegistration() {

        FilterRegistrationBean registration = new FilterRegistrationBean();
        registration.setOrder(1);
        registration.addUrlPatterns("/*");
        registration.setFilter(new MinRestFilter());
        return registration;
    }


}
